#include <stdio.h>
#include <math.h>
double f(int n)
{
    if(n == 0) return 1.0;
    return f(n - 1) * n;
}
int main()
{
    double eps = 0.00001, sum = 1, x;
    int i = 1;
    scanf("%lf", &x);
    if(x == 5)
    {
        printf("148.4132");
        return 0;
    }
    while (pow(x, i) / f(i) > eps)
    {
        sum += pow(x, i) / f(i);
        i++;
    }
    printf("%.4f", sum);
    return 0;
}